import {
  server
} from '../../api/request.js';

export function login(data) {

  return server(
    'POST',
    '/stu/mongo/loginUser',
    data
  )
}

export function login_old(data) {

  return server(
    'POST',
    '/stu/mongo/loginUser_old',
    data
  )
}

export function logout(data) {
  return server(
    'DELETE',
    '/api/auth/jwt/logout?token=' + data.token,

  )
}

export function get_Code() {
  //解决跨域问题


  return server(
    'GET',
    '/api/auth/captcha',

  )
}

export function img(data) {
  return server(
    'GET',
    '/shool/get_img',
    data

  )
}
export function xx_img() {
  return server(
    'GET',
    '/eams/avatar/my.action',


  )
}

//上传头像
export function uploadAvatar(data) {
  return server(
    'POST',
    '/api/auth/user/uploadAvatar?url=' + data,

  )
}

//微信登录
export function wx_login(data) {
  return server(
    'GET',
    '/comment/wx/login',
    data
  )
}

//获取累计用户个数
export function get_user_num() {
  return server(
    'GET',
    '/stu/noToken/getUserCountAndLovers',

  )
}